<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<!-- <script src="https://unpkg.com/vue@next"></script> -->
		<script src="js/v2.6.10/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<p>人民币/美元换算</p>
			<p>￥: <input type="tel" v-model="rmb"></p>
			<p>$ : <input type="text" v-model="dollar"></p>
			    <p v-show="rmb!='' && dollar!=''">{{rmb}}人民币={{dollar}}美元</p>
			    <br>

		</div>
		<script>
			var i = new Vue({
				el: "#app",
				data: {
				 dollar: 0,
					rmb: 0,
				},
				watch: {
					dollar: function(val) {
						this.dollar = val;
						this.rmb = this.dollar * 7.0728;
					},
					rmb: function(val) {
						this.rmb = val;
						this.dollar = this.rmb / 7.0728;
					}
				}				
			})
		</script>
	</body>
</html>
